package me.magicall.db.sql.from;

import me.magicall.db.sql.AbsHasAs;
import me.magicall.db.sql.As;
import me.magicall.db.sql.table.Table;

/**
 * 带有as元素的Table元素。
 * 与Table元素适用场合不同。from子句中的Table可以带有as，但select子句、where子句、insert语句等处无as
 * 
 * @author MaGiCalL
 */
public class TableWithAs extends AbsHasAs implements Fromable {

	public TableWithAs() {
		super();
	}

	public TableWithAs(final Table table, final As as) {
		super(table, as);
	}

	public TableWithAs(final Table table) {
		super(table);
	}

	public void setTable(final Table table) {
		setToSqlable(table);
	}

	public Table getTable() {
		return (Table) getToSqlable();
	}
}
